Optimal. Leaf size=142 \[ \frac {2 C \sec ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (5+2 n)}+\frac {2 (C (3+2 n)+A (5+2 n)) \, _2F_1\left (\frac {1}{2},\frac {1}{4} (-1-2 n);\frac {1}{4} (3-2 n);\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) (5+2 n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {20, 4131, 3857,
2722} \begin {gather*} \frac {2 (A (2 n+5)+C (2 n+3)) \sin (c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1}{4} (-2 n-1);\frac {1}{4} (3-2 n);\cos ^2(c+d x)\right )}{d (2 n+1) (2 n+5) \sqrt {\sin ^2(c+d x)}}+\frac {2 C \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^n}{d (2 n+5)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 20
Rule 2722
Rule 3857
Rule 4131
Rubi steps
\begin {align*} \int \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx &=\left (\sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {3}{2}+n}(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {2 C \sec ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (5+2 n)}+\frac {\left (\left (C \left (\frac {3}{2}+n\right )+A \left (\frac {5}{2}+n\right )\right ) \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {3}{2}+n}(c+d x) \, dx}{\frac {5}{2}+n}\\ &=\frac {2 C \sec ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (5+2 n)}+\frac {\left (\left (C \left (\frac {3}{2}+n\right )+A \left (\frac {5}{2}+n\right )\right ) \cos ^{\frac {1}{2}+n}(c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n\right ) \int \cos ^{-\frac {3}{2}-n}(c+d x) \, dx}{\frac {5}{2}+n}\\ &=\frac {2 C \sec ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (5+2 n)}+\frac {2 (C (3+2 n)+A (5+2 n)) \, _2F_1\left (\frac {1}{2},\frac {1}{4} (-1-2 n);\frac {1}{4} (3-2 n);\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) (5+2 n) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.48, size = 335, normalized size = 2.36 \begin {gather*} -\frac {i 2^{\frac {7}{2}+n} e^{-\frac {1}{2} i d (3+2 n) x} \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{\frac {3}{2}+n} \left (1+e^{2 i (c+d x)}\right )^{\frac {3}{2}+n} \left (\frac {A e^{\frac {1}{2} i d (3+2 n) x} \, _2F_1\left (\frac {7}{2}+n,\frac {1}{4} (3+2 n);\frac {1}{4} (7+2 n);-e^{2 i (c+d x)}\right )}{3+2 n}+\frac {e^{\frac {1}{2} i (4 c+d (7+2 n) x)} \left (2 (A+2 C) (11+2 n) \, _2F_1\left (\frac {7}{2}+n,\frac {1}{4} (7+2 n);\frac {1}{4} (11+2 n);-e^{2 i (c+d x)}\right )+A e^{2 i (c+d x)} (7+2 n) \, _2F_1\left (\frac {7}{2}+n,\frac {1}{4} (11+2 n);\frac {1}{4} (15+2 n);-e^{2 i (c+d x)}\right )\right )}{(7+2 n) (11+2 n)}\right ) \sec ^{-2-n}(c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right )}{d (A+2 C+A \cos (2 c+2 d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.47, size = 0, normalized size = 0.00 \[\int \left (\sec ^{\frac {3}{2}}\left (d x +c \right )\right ) \left (b \sec \left (d x +c \right )\right )^{n} \left (A +C \left (\sec ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________